#!/usr/bin/python
# -*- coding: UTF-8 -*-
# author : bird.zhang@ximalaya.com

# 为了python2和python3的兼容，使用pymysql代替MySQLdb
import pymysql

conn = pymysql.connect(host='192.168.1.161', port=3306, user='naliworld', passwd='password!', db='lamia')

cursor = conn.cursor()
sql = "SELECT uid FROM `tb_live_record_all` WHERE `status` = 9"
cursor.execute(sql)
online_anchor_list = cursor.fetchall()

print(type(online_anchor_list))

print(cursor.description)

print(type(online_anchor_list[1]))
print((online_anchor_list[1]))

conn.close()

# conn = MySQLdb.connect(host='192.168.1.161', port=3306, user='naliworld', passwd='password!', db='lamia')
# cursor = conn.cursor()
